<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="../lib/OSL/layui/css/layui.css">
    <link rel="stylesheet" href="../lib/css/page/lab_manage.css">
</head>

<body>
    <div class="layui-card">
        <div class="layui-card-header">
            <span>宿舍管理员信息</span>
        </div>
        <!-- 卡片区域  -->
        <div class="layui-card-body">
            <!-- 搜索区域   -->
            <form class="layui-form" id="form_search">
                <div class="layui-form-item layui-inline">
                    <label class="layui-form-label">宿舍管理员</label>
                    <div class="layui-input-block">
                        <input type="text" name="lab_class_person" placeholder="请输入宿舍管理员" autocomplete="off"
                            class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item layui-inline">
                    <label class="layui-form-label">楼栋</label>
                    <div class="layui-input-block">
                        <input type="text" name="lab_address" placeholder="请输入楼栋" autocomplete="off"
                            class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item layui-inline">
                    <div style="margin-left: 10px;">
                        <button class="layui-btn btn_search" lay-submit lay-filter="formDemo">搜索</button>
                        <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                    </div>
                </div>
            </form>
            <!-- //数据区 -->
            <table class="layui-table">
                <colgroup>
                    <col />
                    <col />
                    <col />
                </colgroup>
                <thead>
                    <tr>
                        <th>楼栋</th>
                        <th>楼栋管理员</th>
                        <th>楼栋管理员电话</th>
                    </tr>
                </thead>
                <tbody>

                </tbody>
            </table>
            <!-- //分页区域 -->
            <div id="pageBox"></div>
        </div>
    </div>
    <!-- ---------------------------------------------------------------- -->
    <!-- 获取所有宿舍的列表 -->
    <script type="text/html" id="tpl_lab_list">
        {{each data}}
        <tr>
            <th>{{$value.cate_name}}</th>
            <th>{{$value.admin_user}}</th>
            <th>{{$value.phone}}</th>
        </tr>
        {{/each}}
    </script>
    <!-- ---------------------------------------------------------------- -->

    <!-- //---------------------------------------------------------------- -->
    <!-- 根据id修改实验室信息 -->
    <script type="text/html" id="dialog_editLab">
        <form class="layui-form" id="form_editLab" lay-filter="form_edit">
            <input type="hidden" name="id">
            <div class="layui-form-item">
                <label class="layui-form-label">宿舍名称</label>
                <div class="layui-input-block">
                    <input type="text" name="lab_class_name" required lay-verify="required" placeholder="请输入实验室名称"
                        autocomplete="off" class="layui-input">
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label">楼栋管理员</label>
                <div class="layui-input-block">
                    <select name="lab_class_person" lay-verify="required">
                        <option value=""></option>
                        {{each}}
                        <option value="{{$value.username}}">{{$value.username}}</option>
                        {{/each}}
                    </select>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">管理员电话</label>
                <div class="layui-input-block">
                    <input type="text" name="lab_class_person_phone" required lay-verify="required|phone"
                        placeholder="请输入负责人电话" autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">所属楼栋</label>
                <div class="layui-input-block">
                    <select name="lab_address" lay-verify="required">
                        <option value=""></option>
                        {{each}}
                        <option value="{{$value.cate_name}}">{{$value.cate_name}}</option>
                        {{/each}}
                    </select>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-input-block">
                    <button class="layui-btn" lay-submit lay-filter="formDemo">确认修改</button>
                </div>
            </div>
        </form>
    </script>

    <script src="../lib/OSL/jquery.js"></script>
    <script src="../lib/OSL/layui/layui.all.js"></script>
    <script src="../lib/js/baseAPI.js"></script>
    <script src="../lib/OSL/template-web.js"></script>
    <script src="../lib/js/page/stu_admin.js"></script>
</body>

</html>